This was just not useful enough to keep around.
#include "magnifier.h"
#include "menu.h"
#include "misc-info.h"
-#include "object-hierarchy.h"
#include "object-tree.h"
#include "prop-list.h"
#include "recorder.h"
g_type_ensure (GTK_TYPE_INSPECTOR_MAGNIFIER);
g_type_ensure (GTK_TYPE_INSPECTOR_MENU);
g_type_ensure (GTK_TYPE_INSPECTOR_MISC_INFO);
- g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY);
g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_TREE);
g_type_ensure (GTK_TYPE_INSPECTOR_PROP_LIST);
g_type_ensure (GTK_TYPE_INSPECTOR_RECORDER);
'magnifier.c',
'menu.c',
'misc-info.c',
- 'object-hierarchy.c',
'object-tree.c',
'prop-editor.c',
'prop-list.c',
+++ /dev/null
-/*
- * Copyright (c) 2013 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#include "config.h"
-#include <glib/gi18n-lib.h>
-
-#include "object-hierarchy.h"
-
-#include "gtktreeselection.h"
-#include "gtktreestore.h"
-#include "gtktreeview.h"
-#include "gtklabel.h"
-
-
-enum
-{
- COLUMN_OBJECT_NAME
-};
-
-struct _GtkInspectorObjectHierarchyPrivate
-{
- GtkTreeStore *model;
- GtkTreeView *tree;
-};
-
-G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorObjectHierarchy, gtk_inspector_object_hierarchy, GTK_TYPE_BOX)
-
-static void
-gtk_inspector_object_hierarchy_init (GtkInspectorObjectHierarchy *oh)
-{
- oh->priv = gtk_inspector_object_hierarchy_get_instance_private (oh);
- gtk_widget_init_template (GTK_WIDGET (oh));
-}
-
-static void
-gtk_inspector_object_hierarchy_class_init (GtkInspectorObjectHierarchyClass *klass)
-{
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/object-hierarchy.ui");
- gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorObjectHierarchy, model);
- gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorObjectHierarchy, tree);
-}
-
-void
-gtk_inspector_object_hierarchy_set_object (GtkInspectorObjectHierarchy *oh,
- GObject *object)
-{
- GType type;
- const gchar *class_name;
- GtkTreeIter iter, parent;
- GList *list = NULL, *l;
- GHashTable *interfaces;
- GHashTableIter hit;
- GType *ifaces;
- gint i;
-
- gtk_tree_store_clear (oh->priv->model);
-
- if (object == NULL)
- return;
-
- interfaces = g_hash_table_new (g_str_hash, g_str_equal);
- type = ((GTypeInstance*)object)->g_class->g_type;
-
- do
- {
- class_name = g_type_name (type);
- list = g_list_append (list, (gpointer)class_name);
- ifaces = g_type_interfaces (type, NULL);
- for (i = 0; ifaces[i]; i++)
- g_hash_table_add (interfaces, (gchar *)g_type_name (ifaces[i]));
- g_free (ifaces);
- }
- while ((type = g_type_parent (type)));
-
- if (g_hash_table_size (interfaces) > 0)
- {
- gtk_tree_store_append (oh->priv->model, &iter, NULL);
- gtk_tree_store_set (oh->priv->model, &iter,
- COLUMN_OBJECT_NAME, "GInterface",
- -1);
- parent = iter;
- }
- g_hash_table_iter_init (&hit, interfaces);
- while (g_hash_table_iter_next (&hit, (gpointer *)&class_name, NULL))
- {
- gtk_tree_store_append (oh->priv->model, &iter, &parent);
- gtk_tree_store_set (oh->priv->model, &iter,
- COLUMN_OBJECT_NAME, class_name,
- -1);
- }
- g_hash_table_unref (interfaces);
-
- list = g_list_reverse (list);
- for (l = list; l; l = l->next)
- {
- gtk_tree_store_append (oh->priv->model, &iter, l == list ? NULL : &parent);
- gtk_tree_store_set (oh->priv->model, &iter,
- COLUMN_OBJECT_NAME, l->data,
- -1);
- parent = iter;
- }
-
- g_list_free (list);
-
- gtk_tree_view_expand_all (oh->priv->tree);
- gtk_tree_selection_select_iter (gtk_tree_view_get_selection (oh->priv->tree), &iter);
-}
-
-// vim: set et sw=2 ts=2:
+++ /dev/null
-/*
- * Copyright (c) 2013 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef _GTK_INSPECTOR_OBJECT_HIERARCHY_H_
-#define _GTK_INSPECTOR_OBJECT_HIERARCHY_H_
-
-#include <gtk/gtkbox.h>
-
-#define GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY (gtk_inspector_object_hierarchy_get_type())
-#define GTK_INSPECTOR_OBJECT_HIERARCHY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY, GtkInspectorObjectHierarchy))
-#define GTK_INSPECTOR_OBJECT_HIERARCHY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY, GtkInspectorObjectHierarchyClass))
-#define GTK_INSPECTOR_IS_OBJECT_HIERARCHY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY))
-#define GTK_INSPECTOR_IS_OBJECT_HIERARCHY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY))
-#define GTK_INSPECTOR_OBJECT_HIERARCHY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY, GtkInspectorObjectHierarchyClass))
-
-
-typedef struct _GtkInspectorObjectHierarchyPrivate GtkInspectorObjectHierarchyPrivate;
-
-typedef struct _GtkInspectorObjectHierarchy
-{
- GtkBox parent;
- GtkInspectorObjectHierarchyPrivate *priv;
-} GtkInspectorObjectHierarchy;
-
-typedef struct _GtkInspectorObjectHierarchyClass
-{
- GtkBoxClass parent;
-} GtkInspectorObjectHierarchyClass;
-
-G_BEGIN_DECLS
-
-GType gtk_inspector_object_hierarchy_get_type (void);
-void gtk_inspector_object_hierarchy_set_object (GtkInspectorObjectHierarchy *oh,
- GObject *object);
-
-G_END_DECLS
-
-#endif // _GTK_INSPECTOR_OBJECT_HIERARCHY_H_
-
-// vim: set et sw=2 ts=2:
+++ /dev/null
-<interface domain="gtk40">
- <object class="GtkTreeStore" id="model">
- <columns>
- <column type="gchararray"/>
- </columns>
- </object>
- <template class="GtkInspectorObjectHierarchy" parent="GtkBox">
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkScrolledWindow">
- <property name="hscrollbar-policy">never</property>
- <property name="expand">1</property>
- <child>
- <object class="GtkTreeView" id="tree">
- <property name="model">model</property>
- <property name="enable-search">0</property>
- <property name="headers-visible">0</property>
- <property name="enable-tree-lines">1</property>
- <property name="show-expanders">0</property>
- <property name="level-indentation">18</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection">
- <property name="mode">none</property>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn">
- <child>
- <object class="GtkCellRendererText">
- <property name="scale">0.8</property>
- </object>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </template>
-</interface>
#include "controllers.h"
#include "css-editor.h"
#include "css-node-tree.h"
-#include "object-hierarchy.h"
#include "object-tree.h"
#include "size-groups.h"
#include "data-list.h"
g_free (title);
gtk_inspector_prop_list_set_object (GTK_INSPECTOR_PROP_LIST (iw->child_prop_list), selected);
- gtk_inspector_object_hierarchy_set_object (GTK_INSPECTOR_OBJECT_HIERARCHY (iw->object_hierarchy), selected);
gtk_inspector_misc_info_set_object (GTK_INSPECTOR_MISC_INFO (iw->misc_info), selected);
gtk_inspector_css_node_tree_set_object (GTK_INSPECTOR_CSS_NODE_TREE (iw->widget_css_node_tree), selected);
gtk_inspector_size_groups_set_object (GTK_INSPECTOR_SIZE_GROUPS (iw->size_groups), selected);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, child_prop_list);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_css_node_tree);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_recorder);
- gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_hierarchy);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_title);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, size_groups);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, data_list);
</property>
</object>
</child>
- <child>
- <object class="GtkStackPage">
- <property name="name">hierarchy</property>
- <property name="title" translatable="yes">Class Hierarchy</property>
- <property name="child">
- <object class="GtkInspectorObjectHierarchy" id="object_hierarchy"/>
- </property>
- </object>
- </child>
<child>
<object class="GtkStackPage">
<property name="name">css-nodes</property>